<?php

$host = 'localhost';
$username = 'root';
$password = '';
$dbName = 'b21';

mysql_connect($host, $username ,$password) or
            die(mysql_error().'<br>Unable to establish connection with MYSQL');
mysql_select_db($dbName) or
            die(mysql_error.'<br>Unable to select Database');


$select = "SELECT * FROM `practice`";
$select .= " WHERE `passsword`='qwerty'";

$result = mysql_query($select) or die(mysql_error());

var_dump($result);

$rowsSelected =  mysql_num_rows($result);
$lastId = mysql_insert_id();

echo "<h4>$rowsSelected Rows Selected</h4>";

echo '<pre>';
while($ans = mysql_fetch_row($result)){
print_r($ans);
}
